import java.util.Scanner;

public class Huangou {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入购物金额" );
        int m=input.nextInt();
        System.out.println("请输入是否换购");
        String answer=input.next();
        int Q;
        if (answer.equals("换购")){
            if (m>50&&m<=100){
                System.out.println("加1元换购500毫升可乐");
                System.out.println("Q="+(m+1)+"元");}
                else if (m>100&&m<=200){
                System.out.println("加2元换购1000毫升果汁");
                System.out.println("Q="+(m+2)+"元");
                System.out.println("加4元换购炫迈口香糖一瓶");
                System.out.println("Q="+(m+4)+"元");}
                else if (m>200){
                System.out.println("加38元换购一瓶进口红酒");
                System.out.println("Q="+(m+38)+"元");
                System.out.println("加15元换购一袋面粉");
                System.out.println("Q="+(m+15)+"元");}
                else {
                System.out.println("没有换购资格");}
        }
        else {
            System.out.println("Q="+m+"元");}

    }
}
